﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Eatime.Entitys
{
    public class Shop : INotifyPropertyChanged
    {
        public int ShopId { get; set; }

        private string _title;
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                if (value != _title)
                {
                    _title = value;
                    NotifyPropertyChanged("Title");
                }
            }
        }

        public double Lat { get; set; }


        public double Lng { get; set; }


        public Guid Id { get; set; }


        public string WorkTime { get; set; }


        public string Phone { get; set; }


        public string Logo { get; set; }


        public decimal UpSendPrice { get; set; }


        public string DeliverRegion { get; set; }


        public string DeliverArea { get; set; }


        public string DeleverSpeed { get; set; }


        public string Address { get; set; }


        public bool Equals(Shop other)
        {
            if (other.Id == this.Id)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(string info)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(info));
            }
        }
    }
}
